home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 44 / Amiga Format CD44 (1999-08-26)(Future Publishing)(GB)(Track 1 of 3)[!][issue 1999-10].iso / -in_the_mag- / basics / amos / multiwindows.lha / MultiWindows / Gadgets.doc < prev    next >
Text File  |  1999-01-04  |  4KB  |  156 lines

  1. ** Ensure you have setpatch running, and a recent version of AmosPro
  2.    AmosPro V1.00 fails when testing these programs!!
  3.    I couldn't get AmosPro 2.00 to start on my unexpanded 1200, but
  4.    it works fine with my accelerator -- any suggestions??
  5.  
  6. Manual for gadget procedures as seen in RasterMaster 1.6 and MultiWindows
  7.  
  8. These instructions are only as a rough guide, since I copied them
  9. out of my old, dog-eared amos notebook without checking. The code
  10. is very old in parts, and probably hasn't been fully checked.
  11.  
  12.  ---
  13.  
  14. Notes on Multiwindows.
  15.  
  16. In MultiWindows, there are a number of extra parameters for the
  17. different windows etc. The example program should make it clearer,
  18. though.
  19.  
  20. If you get stuck, you could try emailing me for help. I'm not that 
  21. interested in writing a huge document for an enormous, partly obsolete 
  22. program that I'm giving away free!
  23.  
  24. My adress is : M.D.Cameron@durham.ac.uk
  25.  
  26. The AGads2.1 gadgets are not window-based, and this document is 
  27. more relevant to those. The windows was a sort of last-minute(?)
  28. addition.
  29.  
  30.  ---
  31.  
  32. Set the gadget variables at the start of the program to the number of
  33. gads you want to use.
  34.  
  35.  
  36. Gad_Setcolours[Black,White,Grey,Blue]
  37.  
  38. Used to tell the system which colours of your screen palette to use
  39. when drawing the gadgets.
  40.  
  41. Gadscan
  42.  
  43. Call this as frequently as possible in your main loop. It is optimised
  44. and should not slow your program down too much. The number of the gadget
  45. selected will be returned in Param.
  46.  
  47. Gadtype[Gadnum]
  48.  
  49. Will return in Param the type of gadget reserved in the slot you specify
  50. Numbers are as follows:
  51.  
  52.  2  - Button(text)
  53.  5  - Text input gadget
  54.  6  - (Alpha)numerical display
  55.  7  - Cycle gadget
  56.  13 - Vslider
  57.  15 - Hslider
  58.  17 - Checkbox
  59.  20 - Sbut
  60.  23 - Horizontal Slider button 
  61.  25 - Vertical Slider button 
  62.  32 - Radiobuttons
  63.  
  64. Dont trust them though!
  65.  
  66.  ---
  67.  
  68. Gad_Button_create[Gadnum,X,Y,TEXT$]
  69.  
  70. Creates and reserves a text button. Self explanatory.
  71.  
  72.  ---
  73.  
  74. Gad_text_create[Gadnum,X,Y,HSize,Text$,Type]
  75.  
  76. Creates a Text entry gadget. Hsize is measured in chars.
  77.  
  78. Type is as follows: 0 - Alphanumerical
  79.                     1 - Numerical
  80.  
  81. Gad_text_input[Gadnum]
  82.  
  83. Activates a text input gadget and returns the value in param$.
  84.  
  85. Gad_text_next[gadnum]
  86.  
  87. Returns the number of the next text gadget, so that intuition-like
  88. interfaces can be created.
  89.  
  90.  ---
  91.  
  92. Gad_cycle_create[gadnum,x,y,length,item1$]
  93.  
  94. Creates a cycle gadget with one item in the cycle list.
  95.  
  96. Gad_cycle_additem[gadnum,item$]
  97.  
  98. Adds an item to the cycle list.
  99.  
  100. Gad_cycle_get[gadnum]
  101.  
  102. Returns the number of the item that cycle gadget is set to.
  103.  
  104.  ---
  105.  
  106. Gad_display_create[gadnum,x,y,length,text$]
  107.  
  108. Creates a text display.
  109.  
  110. Gad_display_set[gadnum,text$]
  111.  
  112. Sets a display with the text supplied.
  113.  
  114.  ---
  115.  
  116. Sliders
  117.  
  118. Er ... I changed the slider routines a couple of months ago and I can't be
  119. arsed finding out how they work. At least they're fast now. There's plenty
  120. of examples how they work in RasterMaster1.6 - on the Aminet. They're pretty 
  121. straight-forward from what I remember, just call the slider-update procedure
  122. when the gadget loop returns your slider number.
  123.  
  124.  ---
  125.  
  126. Gad_Sbut_create[etc]
  127.  
  128. These are custom buttons which can be any shape and have any graphics inside 
  129. them. Styles are as follows:    
  130.  
  131.  1 - Thin, Custom graphics may be placed inside.
  132.  2 - Thin, No custom graphics may be placed inside.
  133.  3 - Thick, for Hires screenmode, Custom graphics.
  134.  4 - Thick, as above, No custom graphics.
  135.  
  136.  ---
  137.  
  138. Checkboxes, file selectors, infoboxes, requesters etc are easy to use.
  139.  
  140. Radiobuttons are "attached" to each other by means of specifying the
  141. same "cluster", or group number for each one. That way when a radiobut
  142. is pushed, all the others in the same group will pop up.
  143.  
  144.  ---
  145.  
  146. Hope this helps...
  147.  
  148.  Mart, 1998.
  149.  
  150. E-Mail : M.D.Cameron@durham.ac.uk
  151.  
  152.  
  153.  
  154.  
  155. Eof.
  156.